<template>
  <div class="fee-detail-print-page">
    <!-- 主内容区 -->
    <div class="content-wrapper">
      <div class="card-container">
        <!-- 卡片头部 -->
        <div class="card-header">
          <i class="el-icon-money" />
          <span>缴费明细打印（职工）</span>
        </div>

        <!-- 用户信息区域 -->
        <div class="user-info">
          <div class="avatar">
            <!-- 可替换为实际头像或Element UI图标 -->
            <img src="" alt="用户头像">
          </div>
          <div class="user-details">
            <h3 class="user-name">刘大林</h3>
            <div class="insurance-tags">
              <el-tag type="info">职工基本医疗保险</el-tag>
              <el-tag type="info">大额医疗费用补助</el-tag>
              <el-tag type="info">长期照护保险</el-tag>
              <el-tag type="info">生育保险</el-tag>
            </div>
          </div>
        </div>

        <!-- 年月选择列表 -->
        <div class="date-list">
          <el-button
            class="date-item"
            type="text"
            @click="selectDate('2025-11-15')"
          >
            开具年月：2025-11-15 <i class="el-icon-arrow-right" />
          </el-button>
          <el-button
            class="date-item"
            type="text"
            @click="selectDate('2025-11-14')"
          >
            开具年月：2025-11-14 <i class="el-icon-arrow-right" />
          </el-button>
          <el-button
            class="date-item"
            type="text"
            @click="selectDate('2025-11-13')"
          >
            开具年月：2025-11-13 <i class="el-icon-arrow-right" />
          </el-button>
        </div>

        <!-- 打印按钮 -->
        <div class="print-btn-container">
          <el-button type="primary" size="large">打印缴费明细</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'FeeDetailPrint',
  data() {
    return {
      selectedDate: '' // 选中的年月
    }
  },
  methods: {
    selectDate(date) {
      this.selectedDate = date
      console.log('选中年月：', date)
    },
    handleTimeout() {
      this.$message.warning('登录超时，即将退出')
      // 这里可添加“退出登录”逻辑
    }
  }
}
</script>

<style scoped>
.fee-detail-print-page {
  height: 100vh;
  background: linear-gradient(to bottom, #409eff, #2f80ed);
  overflow: hidden;
}

.content-wrapper {
  padding: 20px;
  height: calc(100vh - 60px); /* 减去Header高度 */
  overflow-y: auto;
}

.card-container {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 0 auto;
  max-width: 600px;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  background-color: #409eff;
  padding: 12px 16px;
  border-radius: 8px;
}

.card-header i {
  margin-right: 10px;
  font-size: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6f0ff;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  background-color: #e6f0ff;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

.insurance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-list {
  margin-bottom: 30px;
}

.date-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin-bottom: 10px;
  background-color: #e6f0ff;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.date-item:hover {
  background-color: #d9ecff;
}

.print-btn-container {
  text-align: center;
}

.print-btn-container .el-button {
  width: 100%;
  max-width: 400px;
  font-size: 16px;
}
</style>
